package cn.fay.chapter11;

import java.util.PriorityQueue;
import java.util.Random;

public class Test28 {

	public static void main(String[] args) {
		PriorityQueue<Double> priorityQueue=new PriorityQueue<Double>();
		Random random=new Random(47);
		for(int i=0;i<20;i++)
			priorityQueue.offer(random.nextDouble()*100);
		while (priorityQueue.peek()!=null) 
			System.out.println(priorityQueue.poll());
	}
}
